# include <stdio.h>
# include <string.h>
# include "Header.h"
# include "DirectoryOps.h"

int updateFile(char *filePath, char *data, struct VFS *header) {
	int i;
	for (i = 0; i < MAX_FD_SIZE; i++) {
		if(!strcmp(header -> fd[i].filePath, filePath)) {
			copyString(header -> bl[i].data, data);
			header -> fd[i].size = getSize(data);
			return 1;
		}
	}
	return 0;
} 
